<?php
require_once("db.class.php");
$db = new DB();
// echo "<table width=\"auto\" border=\"1\">";
// echo "<tr>";
// echo "<td>id_user</td>";
// echo "<td>lastname</td>";
// echo "<td>firstname</td>";
// echo "<td>mail</td>";
$db->query("select count(*) as cunt
from user as a 
where a.mail=\" ".$_POST["c1"]." \" and a.pwd=\"".$_POST["c2"]."\"");
/*$db->fetch_assoc()){*/
	if($db->row['cunt']<1)
	{
		echo "ok";
		require("http://citron/~lhour/jypbook/profil.php");
	}else{
		echo "pas ok";
		/*header('Status: 301 Moved Permanently', false, 301);*/
	}
	/*echo "<tr>";
	echo "<td>".$db->row['id_user']."</td>" ;
	echo "<td>".$db->row['lastname']."</td>";
	echo "<td>".$db->row['firstname']."</td>";
	echo "<td>".$db->row['mail']."</td>";
	echo "</tr>";
*/

//echo "</table>";
?>